package com;

import java.io.Serializable;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

@ManagedBean
@ViewScoped
public class ProjectPage implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5447221745031655033L;

	private String wekaOut;
	private Weka[] wekaList;

	public void createWekaTextOutput() throws Exception {
		wekaOut = (new WekaRunner()).run();
		wekaList = new Weka[wekaOut.split("\n").length];
		System.out.println(wekaList.length);
		for (int i = 0; i < wekaList.length; i++) {
			System.out.println(wekaList[i]);
			wekaList[i] = new Weka(wekaOut.split("\n")[i]);
		}
	}

	public String getWekaOut() {
		return wekaOut;
	}

	public Weka[] getWekaList() {
		return wekaList;
	}
}
